<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误 - 智能医疗诊断助手</title>
    <style>
        :root {
            --primary-color: #3498db;
            --text-color: #333333;
            --light-text-color: #777777;
            --background-color: #f5f8fa;
            --card-bg-color: #ffffff;
            --border-color: #e1e8ed;
            --error-color: #e74c3c;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --border-radius: 8px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .error-container {
            max-width: 600px;
            padding: 40px;
            background-color: var(--card-bg-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            text-align: center;
        }

        .error-icon {
            font-size: 80px;
            color: var(--error-color);
            margin-bottom: 20px;
        }

        h1 {
            color: var(--error-color);
            margin-bottom: 20px;
        }

        .error-message {
            margin-bottom: 30px;
            font-size: 1.1rem;
        }

        .error-details {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: var(--border-radius);
            margin-bottom: 30px;
            text-align: left;
            font-family: monospace;
        }

        .back-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: white;
            padding: 10px 20px;
            border-radius: 4px;
            text-decoration: none;
            transition: background-color 0.3s;
        }

        .back-btn:hover {
            background-color: #2980b9;
        }
    </style>
</head>
<body>
    <div class="error-container">
        <div class="error-icon">
            <svg width="80" height="80" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
                <circle cx="12" cy="12" r="10"></circle>
                <line x1="12" y1="8" x2="12" y2="12"></line>
                <line x1="12" y1="16" x2="12.01" y2="16"></line>
            </svg>
        </div>
        <h1 th:text="'错误 - ' + ${status}">错误</h1>
        <p class="error-message" th:text="${error}">发生了一个错误</p>
        
        <div class="error-details" th:if="${message}">
            <p th:text="${message}">错误详情</p>
        </div>
        
        <div class="error-details" th:if="${trace}">
            <p th:text="${trace}">错误堆栈</p>
        </div>
        
        <a th:href="@{/}" class="back-btn">返回首页</a>
    </div>
</body>
</html> 